<!--
var micons = null;
var cmenus = null;
var cmicons = null;
function initMenu(){
	micons = new Array();
	cmenus = new Array();
	cmicons = new Array();
	for(var i=0;i<10;i+=1){
		var micon = document.getElementById("menu_icon"+i);
		if(micon!=null){
			micons[i] = micon;
			var cmenu = document.getElementById("cmenu"+i);
			if(cmenu!=null){
				cmenus[i] = cmenu;
				cmicons[i] = new Array();
				for(var j=0;j<10;j+=1){
					var cmicon = document.getElementById("menu_icon"+i+j);
					if(cmicon!=null){
						cmicons[i][j] = cmicon;
					}
				}
			}
		}
	}
}
function selectedMenu(index){
	if(micons==null){
		initMenu();
	}
	if(index>=0&&index<micons.length){
		for(var i=0;i<micons.length;i+=1){
			if(micons[i]!=null&&cmenus[i]!=null){
				if(i==index){
					if(cmenus[i].style.display=="none"){
						micons[i].src="img/icon_opened_menu.gif";
						cmenus[i].style.display="block";
						var openEqua = linearEquation(cmenus[i].offsetHeight);
						if(openEqua!=null){
							var openCmenu = cmenus[i];
							openCmenu.style.height = 0;
							var openIntervalId = setInterval(function(){
								if(openEqua.notFinish()){
									openCmenu.style.height = openEqua.next();
								} else {
									clearInterval(openIntervalId);
								}
							},30);
						}
					} else {
						micons[i].src="img/icon_closed_menu.gif";
						cmenus[i].style.display="none";
					}
				} else {
					if(cmenus[i].style.display!="none"){
						micons[i].src="img/icon_closed_menu.gif";
						cmenus[i].style.display="none";
					}
				}
			}
		}
	}
}
//-->